package com.tao.design.proxy;

/**
 * @projectName: DesignMode
 * @package: com.tao.design.proxy
 * @className: ProxyObject2
 * @author: TT_Hugo
 * @description: TODO
 * @date: 2022/12/27 16:15
 * @version: 1.0
 */
public class ProxyObject2 implements Object2 {
    Object2 obj;

    public void ProxyObject() {
        System.out.println("这是代理类");
        obj = new Object2Impl();
    }

    @Override
    public void action(){
        System.out.println("代理开始");
        obj.action();
        System.out.println("代理结束");
    }
}
